<template>
  <div class="base-container" id="main">
    <t-steps :current="activeForm" status="process" :onChange="onCurChanged">
      <t-step-item v-for="(item,index) in stepList" :title="item.title" :key="index" :content="isSubmit(item.id)">
      </t-step-item>
    </t-steps>
    <t-loading text="加载中..." :fullscreen="false" attach="#main" :loading="applyLoading" size="medium">
    </t-loading>
    <div class="apply-form">
      <t-form ref="form" :key="activeForm" :colon="true" v-if="activeForm === 0" class="step-form" :data="formData0"
              :rules="rules0"
              labelWidth="120px">
        <div style="flex: 1">
          <t-col :span="12">
            <t-form-item label="工法名称" name="name">
              <t-input clearable style="width: 390px" v-model="formData0.name"></t-input>
            </t-form-item>
            <t-form-item label="工法级别" name="level">
              <t-select style="width: 390px" clearable v-model="formData0.level"
                        :options="dict.type.construct_method_level">
              </t-select>
            </t-form-item>
            <t-form-item label="获得时间" name="obtainDate">
              <t-date-picker clearable style="width: 390px" v-model="formData0.obtainDate"></t-date-picker>
            </t-form-item>
            <t-form-item help="手输支持自定义创建" label="关键词" name="keyWordList">
              <t-select
                v-model="formData0.keyWordList"
                creatable
                filterable
                multiple
                placeholder="手输支持自定义创建"
                :options="dict.type.cg_key_word"
                style="width: 390px;"
                @create="createKeyWordOptions"
              >
              </t-select>
            </t-form-item>
            <t-card class="step-card" size="small" title="编制单位">
              <t-form-item  label-width="0" label="编制单位" name="companyList">
                <gf-company :edit-open="true"  ref="gf-company" v-model="formData0.companyList"></gf-company>
              </t-form-item>
            </t-card>
            <t-card class="step-card" size="small" title="编制人员">
              <t-form-item label-width="0" label="编制人员" name="memberList">
                <gf-member  ref="gf-member" v-model="formData0.memberList" :editOpen="true"></gf-member>
              </t-form-item>
            </t-card>
          </t-col>
        </div>
        <t-row>
          <t-col :span="11">
            <t-button theme="primary" @click="onSubmit0()">下一步</t-button>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
          <t-form ref="form" :key="activeForm" v-if="activeForm === 1" label-align="top" class="step-form" :data="formData1"
                  :rules="rules1"
                  labelWidth="120px">
            <div style="flex: 1">
              <t-form-item name="content" label="前言">

                <tiny-mce-editor :key="activeForm" v-model="formData1.content"></tiny-mce-editor>
              </t-form-item>
            </div>
            <t-row>
              <t-col :span="11">
                <t-space :size="10">
                <t-button  @click="onCurChanged(0)" theme="primary" variant="base">上一步
                </t-button>
                <t-button theme="primary" @click="onSubmit1()">下一步</t-button>
                </t-space>
              </t-col>
              <t-col :span="1" class="operation-container">
                <t-button variant="outline" @click="close">返回</t-button>
              </t-col>
            </t-row>
          </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 2" label-align="top" class="step-form" :data="formData2"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="特点">

            <tiny-mce-editor :key="activeForm" v-model="formData2.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(1)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit2()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 3" label-align="top" class="step-form" :data="formData3"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="适用范围">

            <tiny-mce-editor :key="activeForm" v-model="formData3.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(2)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit3()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 4" label-align="top" class="step-form" :data="formData4"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item  name="content" label="工艺原理">

            <tiny-mce-editor :key="activeForm" v-model="formData4.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(3)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit4()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 5" label-align="top" class="step-form" :data="formData5"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="施工工艺流程及操作要点">

            <tiny-mce-editor :key="activeForm" v-model="formData5.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(4)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit5()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 6" label-align="top" class="step-form" :data="formData6"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="材料与设备">

            <tiny-mce-editor :key="activeForm" v-model="formData6.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(5)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit6()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 7" label-align="top" class="step-form" :data="formData7"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="质量控制">

            <tiny-mce-editor :key="activeForm" v-model="formData7.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(6)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit7()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 8" label-align="top" class="step-form" :data="formData8"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="安全措施">

            <tiny-mce-editor :key="activeForm" v-model="formData8.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(7)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit8()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 9" label-align="top" class="step-form" :data="formData9"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="环保措施">

            <tiny-mce-editor :key="activeForm" v-model="formData9.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(8)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit9()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 10" label-align="top" class="step-form" :data="formData10"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="效益分析">

            <tiny-mce-editor :key="activeForm" v-model="formData10.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(9)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit10()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 11" label-align="top" class="step-form" :data="formData11"
              :rules="rules1"
              labelWidth="120px">
        <div style="flex: 1">
          <t-form-item name="content" label="应用实例">

            <tiny-mce-editor :key="activeForm" v-model="formData11.content"></tiny-mce-editor>
          </t-form-item>
        </div>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(10)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit11()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
      <t-form ref="form" :key="activeForm" v-if="activeForm === 12" class="step-form" :data="formData12" :rules="rules12"
              labelWidth="120px">
        <t-row style="flex: 1">
          <t-alert style="margin-bottom: 14px;width: 100%" theme="info" title="说明：">
            <div slot="message">
              <p class="span-txt">
                内部项目：当前系统申报的项目(非必填)
              </p>
              <p class="span-txt">
                外部项目：未在当前系统申报的项目(非必填)
              </p>
            </div>
          </t-alert>
          <t-form-item :show-error-message="false" name="projectList">
            <gf-project :objId="objId" ref="gf-project" :applyData="formData12.applyData" v-model="formData12.projectList"
                              :editOpen="true"></gf-project>
          </t-form-item>
        </t-row>
        <t-row>
          <t-col :span="11">
            <t-space :size="10">
            <t-button  @click="onCurChanged(11)" theme="primary" variant="base">上一步
            </t-button>
            <t-button theme="primary" @click="onSubmit12()">下一步</t-button>
            </t-space>
          </t-col>
          <t-col :span="1" class="operation-container">
            <t-button variant="outline" @click="close">返回</t-button>
          </t-col>
        </t-row>
      </t-form>
          <t-form ref="form" :key="activeForm" v-if="activeForm === 13" class="step-form" :data="formData13" :rules="rules13"
                  labelWidth="120px">
            <div style="flex: 1">
              <t-table row-key="id" :columns="projectFileColumns" :data="projectFileData">
                <template #id="{row, rowIndex}">
                  {{ rowIndex+1 }}
                </template>
                <template #op="{row}">
                  <file-upload tips="限制pdf、图片" accept="application/pdf,image/*" v-model="row.fileIds"
                               :moduleKey="row.moduleKey"
                               :fileList="row.fileLists"
                               :multiple="true">
                    <t-button variant="outline">
                      <t-icon name="cloud-upload" slot="icon"/>
                      点击上传
                    </t-button>
                  </file-upload>
                </template>
                <template #c1="{row}">
                  <a v-if="row.c3" class="t-button-link" :href="`${file_domain}/${row.c3}`" target="_blank">{{ row.c1 }}</a>
                  <div v-else>{{ row.c1 }}</div>
                </template>
              </t-table>
            </div>
            <t-row>
              <t-col :span="11">
                <t-space :size="10">
                <t-button  @click="onCurChanged(11)" theme="primary" variant="base">上一步
                </t-button>
                <!-- <t-button  theme="primary" @click="onSubmit13(1)">暂存</t-button> -->
               <t-tooltip content="提交后仍可以修改">
                  <t-button :disabled="isCommit" theme="primary" @click="onSubmit13(2)">提交</t-button>
               </t-tooltip>
                </t-space>
              </t-col>
              <t-col :span="1" class="operation-container">
                <t-button variant="outline" @click="close">返回</t-button>
              </t-col>
            </t-row>
          </t-form>
    </div>
  </div>
</template>

<script>
import { VITE_FILE_DOMAIN } from '@/api/upload'
import gfMember from "./components/gf-member.vue";
import gfCompany from "./components/gf-company.vue";
import gfProject from "./components/gf-project.vue";
import TinyMceEditor from "@/components/TinyMceEditor/index.vue";
import {getFiles} from "@/api/common";
import FileUpload from "@/components/FileUpload/index.vue";

export default {
  name: "gf-apply",
  dicts: ['cg_key_word', 'construct_method_level'],
  components: {
    gfMember,
    gfCompany,
    FileUpload,
    TinyMceEditor,
    gfProject
  },
  data() {
    return {
      site_tag: import.meta.env.VITE_SITE_TAG,
      file_domain: VITE_FILE_DOMAIN,
      projectFileData: [
        {
          id: 1,
          c1: "工法附件",
          c2: "是",
          moduleKey: "gfFJ",
          fileIds: [],
          fileLists: [],
          require: true,
        },
      ],
      projectFileColumns: [
        {
          colKey: "id",
          title: "序号",
          align: "center",
          width: 64
        },
        {
          colKey: "c1",
          title: "附件名称",
          align: "center",
        },
        {
          colKey: "c2",
          title: "是否必需",
          align: "center",
        },
        {
          colKey: "op",
          title: "操作",
          align: "left",
        },
      ],
      objId: null,
      taskId: null,
      applyLoading: false,
      isCommit: false,
      activeForm: 0,
      formData0: {
        keyWordList: [],
        keyWord: '',
        name: '', // 工法名称
        level: '', // 工法级别
        obtainDate: '', // 获得时间
        companyList: [], // 编制单位
        memberList: [],  // 编制成员
      },
      rules0: {
        keyWordList: [{required: true, validator: (val) => val && val.length, message: "关键词不能为空", type: "error"}],
        name: [{required: true, message: "工法名称不能为空"}],
        level: [{required: true, message: "工法级别不能为空"}],
        obtainDate: [{required: true, message: "获得时间不能为空"}],
        companyList: [
          {required: true, validator: (val) => val && val.length, message: "编制单位不能为空", type: "error"}
        ],
        memberList: [
          {required: true, validator: (val) => val && val.length, message: "编制人员不能为空", type: "error"}
        ]
      },
      formData1: {
        content: ''
      },
      rules1: {
        content: [{required: true, message: "前言不能为空"}],
      },
      formData2: {
        content: ''
      },
      rules2: {
        content: [{required: true, message: "特点不能为空"}],
      },
      formData3: {
        content: ''
      },
      rules3: {
        content: [{required: true, message: "适用范围不能为空"}],
      },
      formData4: {
        content: ''
      },
      rules4: {
        content: [{required: true, message: "工艺原理不能为空"}],
      },
      formData5: {
        content: ''
      },
      rules5: {
        content: [{required: true, message: "施工工艺流程及操作要点不能为空"}],
      },
      formData6: {
        content: ''
      },
      rules6: {
        content: [{required: true, message: "材料与设备不能为空"}],
      },

      formData7: {
        content: ''
      },
      rules7: {
        content: [{required: true, message: "质量控制不能为空"}],
      },
      formData8: {
        content: ''
      },
      rules8: {
        content: [{required: true, message: "安全措施不能为空"}],
      },
      formData9: {
        content: ''
      },
      rules9: {
        content: [{required: true, message: "环保措施不能为空"}],
      },
      formData10: {
        content: ''
      },
      rules10: {
        content: [{required: true, message: "效益分析不能为空"}],
      },

      formData11: {

      },
      rules11: {
        content: [{required: true, message: "应用实例不能为空"}],
      },
      formData12:{
        projectList: [],
        applyData: []
      },
      rules12:{
      },
      formData13: {

      },
      rules13: {
      },
      stepList:[
        {
          id: 'gfId',
          title: '工法信息',
          require: true,
        },
        {
          id: 'prefaceId',
          title: '前言',
          require: true,
        },
        {
          id: 'featureId',
          title: '特点',
          require: true,
        },
        {
          id: 'scopeId',
          title: '适用范围',
          require: true,
        },
        {
          id: 'principleId',
          title: '工艺原理',
          require: true,
        },
        {
          id: 'processId',
          title: '施工工艺流程及操作要点',
          require: true,
        },
        {
          id: 'equipmentId',
          title: '材料与设备',
          require: true,
        },
        {
          id: 'qualityId',
          title: '质量控制',
          require: true,
        },
        {
          id: 'measureId',
          title: '安全措施',
          require: true,
        },
        {
          id: 'environmentId',
          title: '环保措施',
          require: true,
        },
        {
          id: 'benefitId',
          title: '效益分析',
          require: true,
        },
        {
          id: 'applicationId',
          title: '应用实例',
          require: true,
        },
        {
          id: 'projectId',
          title: '项目来源',
          require: false,
        },
        {
          id: 'fileId',
          title: '附件信息',
          require: false,
        }
      ]
    }
  },
  watch: {
    activeForm: {
      immediate: true,
      handler(val) {
        const targetEle = document.getElementById("main")
        if (targetEle) {
          const {pos, top} = targetEle.style;
          targetEle.style.position = 'relative';
          targetEle.style.top = '-100px';
          targetEle.scrollIntoView({behavior: 'smooth', block: 'start', inline: "nearest"});
          targetEle.style.top = top;
          targetEle.style.position = pos;
        }
      }
    }
  },
  created() {
    const taskId = this.$route.params && this.$route.params.taskId;
    if (!taskId) {
      this.$message.error("缺少id");
      return false;
    }
    this.taskId = taskId;
    this.objId = sessionStorage.getItem(`${this.taskId}-gf-gfId`);
    const activeForm = Number(sessionStorage.getItem(`${this.taskId}-gf-activeForm`)) || 0;
    this.onCurChanged(activeForm, 0);
  },
  methods: {
    onCurChanged(cur, pre) {
      if (Number(cur) !== 0) {
        if (!sessionStorage.getItem(`${this.taskId}-gf-gfId`)) {
          this.applyLoading = false;
          this.$message.error("工法信息还未提交")
          return false;
        }
      }
      this.applyLoading = true;
      if (Number(cur) === 0) {
        if (sessionStorage.getItem(`${this.taskId}-gf-gfId`)) {
          const gfId = Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`));
          this.$api.cgzh.gf.get(gfId).then(response => {
            if (response.data) {
              this.formData0.keyWordList = response.data.keyWord?.split(",").filter(item=> item !== '')
              Object.assign(this.formData0, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }
      } else if (Number(cur) === 1) {
        if (sessionStorage.getItem(`${this.taskId}-gf-prefaceId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-prefaceId`));
          this.$api.cgzh.gf.prefaceGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData1, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }
      } else if (Number(cur) === 2) {
        if (sessionStorage.getItem(`${this.taskId}-gf-featureId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-featureId`));
          this.$api.cgzh.gf.featureGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData2, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }
      } else if (Number(cur) === 3) {
        if (sessionStorage.getItem(`${this.taskId}-gf-scopeId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-scopeId`));
          this.$api.cgzh.gf.scopeGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData3, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }
      } else if (Number(cur) === 4) {
        if (sessionStorage.getItem(`${this.taskId}-gf-principleId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-principleId`));
          this.$api.cgzh.gf.principleGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData4, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }else if (Number(cur) === 5) {
        if (sessionStorage.getItem(`${this.taskId}-gf-processId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-processId`));
          this.$api.cgzh.gf.processGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData5, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }else if (Number(cur) === 6) {
        if (sessionStorage.getItem(`${this.taskId}-gf-equipmentId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-equipmentId`));
          this.$api.cgzh.gf.equipmentGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData6, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }
      else if (Number(cur) === 7) {
        if (sessionStorage.getItem(`${this.taskId}-gf-qualityId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-qualityId`));
          this.$api.cgzh.gf.qualityGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData7, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }else if (Number(cur) === 8) {
        if (sessionStorage.getItem(`${this.taskId}-gf-measureId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-measureId`));
          this.$api.cgzh.gf.measureGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData8, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }
      else if (Number(cur) === 9) {
        if (sessionStorage.getItem(`${this.taskId}-gf-environmentId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-environmentId`));
          this.$api.cgzh.gf.environmentGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData9, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }else if (Number(cur) === 10) {
        if (sessionStorage.getItem(`${this.taskId}-gf-benefitId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-benefitId`));
          this.$api.cgzh.gf.benefitGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData10, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }
      else if (Number(cur) === 11) {
        if (sessionStorage.getItem(`${this.taskId}-gf-applicationId`)) {
          const objId = Number(sessionStorage.getItem(`${this.taskId}-gf-applicationId`));
          this.$api.cgzh.gf.applicationGet(objId).then(response => {
            if (response.data) {
              Object.assign(this.formData11, response.data)
            }
            this.activeForm = cur;
            sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
            this.applyLoading = false;
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }

      }
      else if (Number(cur) === 12) {
        // 通过子系统跳转过来录入
        const { serviceCode, serviceId, serviceName, businessId,businessName } = this.$route.query;
        if(businessId){
          this.formData12.applyData = [
            {
              id: Date.parse(new Date()),
              constructId: this.objId,
              serviceId: Number(serviceId),
              serviceName,
              serviceCode,
              businessId: Number(businessId),
              businessName,
              isInnerProject: '1',
              projectOptions: [
                {
                  businessId: Number(businessId),
                  businessName,
                }
              ]
            }
          ]
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }else {
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }
      }
      else if (Number(cur) === 13) {
        getFiles(sessionStorage.getItem(`${this.taskId}-gf-gfId`)).then((res) => {
          if (res.data.length > 0) {
            sessionStorage.setItem(`${this.taskId}-gf-fileId`, res.data.length)
          }
          const files = {}
          res.data.forEach((item) => {
            if (!files[item.moduleKey]) {
              files[item.moduleKey] = []
            }
            files[item.moduleKey].push({
              name: item.fileName,
              url: item.fullFilePath,
              id: item.id,
              filePath: item.filePath
            })
          })
          this.projectFileData.forEach((val, index) => {
            this.projectFileData[index].fileLists = files[val.moduleKey] || [];
            this.projectFileData[index].fileIds = files[val.moduleKey]?.map(val => val.id) || [];
          })
          this.activeForm = cur;
          sessionStorage.setItem(`${this.taskId}-gf-activeForm`, cur);
          this.applyLoading = false;
        }).catch((e) => {
          this.applyLoading = false;
          this.$message.error(e.toString());
        });
      } else {
        this.applyLoading = false;
      }
    },
    isSubmit(name) {
      if (sessionStorage.getItem(`${this.taskId}-gf-${name}`)) {
        return '已提交'
      }
      return '未提交';
    },
    isSubmitStatus(name) {
      return !!sessionStorage.getItem(`${this.taskId}-gf-${name}`);
    },
    onSubmit0() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          this.formData0.keyWord = this.formData0.keyWordList.join(",")
          const isValidate = this.$refs["gf-company"].checkData()
          if (!isValidate) {
            return false;
          }
          if (!sessionStorage.getItem(`${this.taskId}-gf-gfId`)) {
            this.$api.cgzh.gf.add({
              ...this.formData0,
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-gfId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(1)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.update({
              ...this.formData0,
              id: sessionStorage.getItem(`${this.taskId}-gf-gfId`)
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(1)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit1() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-prefaceId`)) {
            this.$api.cgzh.gf.prefaceAdd({
              ...this.formData1,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-prefaceId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(2)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.prefaceUpdate({
              ...this.formData1,
              id: sessionStorage.getItem(`${this.taskId}-gf-prefaceId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(2)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit2() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-featureId`)) {
            this.$api.cgzh.gf.featureAdd({
              ...this.formData2,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-featureId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(3)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.featureUpdate({
              ...this.formData2,
              id: sessionStorage.getItem(`${this.taskId}-gf-featureId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(3)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit3() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-scopeId`)) {
            this.$api.cgzh.gf.scopeAdd({
              ...this.formData3,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`)),
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-scopeId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(4)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.scopeUpdate({
              ...this.formData3,
              id: sessionStorage.getItem(`${this.taskId}-gf-scopeId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(4)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit4() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-principleId`)) {
            this.$api.cgzh.gf.principleAdd({
              ...this.formData4,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`)),
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-principleId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(5)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.principleUpdate({
              ...this.formData4,
              id: sessionStorage.getItem(`${this.taskId}-gf-principleId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(5)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit5() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-processId`)) {
            this.$api.cgzh.gf.processAdd({
              ...this.formData5,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-processId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(6)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.processUpdate({
              ...this.formData5,
              id: sessionStorage.getItem(`${this.taskId}-gf-processId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(6)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit6() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-equipmentId`)) {
            this.$api.cgzh.gf.equipmentAdd({
              ...this.formData6,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-equipmentId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(7)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.equipmentUpdate({
              ...this.formData6,
              id: sessionStorage.getItem(`${this.taskId}-gf-equipmentId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(7)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit7() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-qualityId`)) {
            this.$api.cgzh.gf.qualityAdd({
              ...this.formData7,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-qualityId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(8)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.qualityUpdate({
              ...this.formData7,
              id: sessionStorage.getItem(`${this.taskId}-gf-qualityId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(8)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit8() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-measureId`)) {
            this.$api.cgzh.gf.measureAdd({
              ...this.formData8,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-measureId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(9)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.measureUpdate({
              ...this.formData8,
              id: sessionStorage.getItem(`${this.taskId}-gf-measureId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(9)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit9() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-environmentId`)) {
            this.$api.cgzh.gf.environmentAdd({
              ...this.formData9,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`)),
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-environmentId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(10)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.environmentUpdate({
              ...this.formData9,
              id: sessionStorage.getItem(`${this.taskId}-gf-environmentId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(10)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit10() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-benefitId`)) {
            this.$api.cgzh.gf.benefitAdd({
              ...this.formData10,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-benefitId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(11)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.benefitUpdate({
              ...this.formData10,
              id: sessionStorage.getItem(`${this.taskId}-gf-benefitId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(11)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit11() {
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          this.applyLoading = true;
          if (!sessionStorage.getItem(`${this.taskId}-gf-applicationId`)) {
            this.$api.cgzh.gf.applicationAdd({
              ...this.formData11,
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.objId = response.data.id;
              sessionStorage.setItem(`${this.taskId}-gf-applicationId`, response.data.id)
              this.$message.success('提交成功');
              this.onCurChanged(12)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          } else {
            this.$api.cgzh.gf.applicationUpdate({
              ...this.formData11,
              id: sessionStorage.getItem(`${this.taskId}-gf-applicationId`),
              constructId: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`))
            }).then(response => {
              this.$message.success('提交成功');
              this.onCurChanged(12)
            }).catch((e) => {
              this.applyLoading = false;
              this.$message.error(e.toString());
            });
          }
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit12(){
      this.$refs.form.validate().then((validateResult) => {
        if (validateResult === true) {
          const isValidate = this.$refs["gf-project"].checkData()
          if (!isValidate) {
            return false;
          }
          this.applyLoading = true;
          this.$api.cgzh.gf.projectAddList(this.formData12.projectList).then(response => {
            sessionStorage.setItem(`${this.taskId}-gf-projectId`, this.formData12.projectList.length)
            this.$message.success('提交成功');
            this.onCurChanged(13)
          }).catch((e) => {
            this.applyLoading = false;
            this.$message.error(e.toString());
          });
        } else {
          const firstError = Object.values(validateResult)[0]?.[0]?.message;
          this.$message.error(firstError);
        }
      });
    },
    onSubmit13(type) {
      if (type === 1) {
        this.applyLoading = true;
        const sysAttMainIds = []
        this.projectFileData.forEach(val => {
          sysAttMainIds.push(...val.fileIds)
        })
        this.$api.cgzh.gf.update({
          id: sessionStorage.getItem(`${this.taskId}-gf-gfId`),
          sysAttMainVo: {
            sysAttMainIds,
          }
        }).then(val => {
          sessionStorage.setItem(`${this.taskId}-fileId`, this.projectFileData.length);
          this.$message.success('暂存成功');
          this.applyLoading = false;
          // this.close();
        }).catch((e) => {
          this.applyLoading = false;
          this.$message.error(e.toString());
        });
      } else {
        const isValidate = this.projectFileData.every(val => {
          if (val.require && val.fileIds.length <= 0) {
            this.$message.error(`需要上传${val.c1}`);
            return false;
          }
          return true
        })
        if (!isValidate) {
          return false
        }
        this.stepList.forEach((val)=>{
          if (!sessionStorage.getItem(`${this.taskId}-gf-${val.id}`) && val.require) {
            this.$message.error(`${val.title}还未提交`)
            this.applyLoading = false;
            return false;
          }
        })
        this.applyLoading = true;
        this.isCommit = true;
        const sysAttMainIds = []
        this.projectFileData.forEach(val => {
          sysAttMainIds.push(...val.fileIds)
        })
        this.$api.cgzh.gf.submit({
          id: Number(sessionStorage.getItem(`${this.taskId}-gf-gfId`)),
          sysAttMainVo: {
            sysAttMainIds
          }
        }).then(val => {
          sessionStorage.setItem(`${this.taskId}-fileId`, this.projectFileData.length);
          this.$message.success('提交成功');
          this.applyLoading = false;
          this.isCommit = false;
          this.close();
        }).catch((e) => {
          this.applyLoading = false;
          this.isCommit = false;
          this.$message.error(e.toString());
        });
      }
    },
    createKeyWordOptions(value) {
      this.dict.type.cg_key_word.push({
        label: `${value}`,
        value,
      });
    },
    close() {
      this.applyLoading = false;
      setTimeout(() => {
        this.$tab.closeOpenPage({path: "/cgzh/gf/gf-my"});
      }, 1000)
    },
  }
}
</script>

<style lang="less" scoped>
.base-container {
  display: flex;
  flex-direction: column;
}

.step-form {
  padding: 0 24px;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.t-row {
  margin-bottom: 14px;
}

.step-card {
  height: 100%;
  margin-bottom: 14px;
  padding-bottom: 14px;
}
</style>
